package com.zjt.service;

import com.zjt.dao.IStaticParameterDao;
import com.zjt.entity.StaticParameter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

/**
 * 物码中心数据采集的DAO interface;
 * 
 * @author xueyanbeijing
 */
@Component
public class StaticParameterService implements IStaticParameterService {
    private static Logger logger = LoggerFactory.getLogger(StaticParameterService.class);
    private IStaticParameterDao staticParameterDao;
    @Autowired
    public void setStaticParameterDao(IStaticParameterDao staticParameterDao) {
        this.staticParameterDao = staticParameterDao;
    }

    @Override
    public String getParameterValueByName(String parameterName) {
        return staticParameterDao.findByParameterName(parameterName).getParameterValue();
  }

    @Override
    public List<StaticParameter> getStaticParameterList() {
        return (List<StaticParameter>)staticParameterDao.findAll();  //To change body of implemented methods use File | Settings | File Templates.
    }
}
